package org.celery.modules.purchase.service;

import org.celery.modules.purchase.entity.Purchase;
import org.celery.modules.purchase.vo.PurchaseVO;
import org.celery.modules.ticket.entity.Ticket;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.secure.BladeUser;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 店铺表 服务类
 *
 * @author Celery
 * @since 2023-07-16
 */
public interface IPurchaseService extends BaseService<Purchase> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param purchase
	 * @return
	 */
	IPage<PurchaseVO> selectPurchasePage(IPage<PurchaseVO> page, PurchaseVO purchase);


	/**
	 * 插件的数据存储操作
	 */
	Boolean savePurchaseObject(Purchase purchase);

	/**
	 * 空实现，主要是为了插件拿到mailName
	 */
	Boolean getMailName(String mailName);

	/**
	 * 用于检测是否退款，将退款的订单状态改变
	 */
	Boolean changeTickStatus(String mailName, Integer status);

	/**
	 * 筛选当前用户存在，可以拿到的订单号方便页面跳转
	 */
	String getPurchaseLocationGoodList();

    List<Map<String, Object>> staticsList(String shopName, LocalDateTime startTime, LocalDateTime endTime, BladeUser user);
}
